package com.zsule.utils.io;





public class SmsTool {
    // 存储主站域名
	private static PropertyUtil propertyUtil = PropertyUtil.getInstance("sms");
	/**
	 * @return
	 * 返回object 数组，
	 */
	public static String[] getActiveUrlByMobile() {
		String [] ss = new String[2];
		// 获得模板内容
		String activeText = propertyUtil.getProperty("active_mobile_text");
		String randomCode = StringUtils.getRandStr(4);
		activeText = activeText.replace("%%", randomCode);
		ss[0] = randomCode;
		ss[1] = activeText;
		return ss;
	}

	
	/**
	 * @author taylor lijingxin
	 * @param userinfo
	 * @DESC 获取发短信远程连接地址
	 * @return 
	 */
	public static String getSendSmsUrl() {
		String baseUrl = propertyUtil.getProperty("send_sms_url");
		return baseUrl;
	}
	
	/**
	 * @param user
	 * @return
	 * 返回object 数组，
	 */
	public static String[] getAppVerifyByMobile(int type) {
		String [] ss = new String[2];
		// 获得模板内容
		String activeText = propertyUtil.getProperty("app_verify_code_" + type);
		String randomCode = StringUtils.getRandStr(4);
		activeText = activeText.replace("%%", randomCode);
		ss[0] = randomCode;
		ss[1] = activeText;
		return ss;
	}

}
